package routes

import (
	"game-server/app/controllers/admin"
	"game-server/app/middleware"
	"game-server/app/services"

	"github.com/gin-gonic/gin"
)

// SetCategoryGroupRoutes 定义 Category 分组路由
func SetCategoryGroupRoutes(router *gin.RouterGroup) {
	frontRouter := router.Group("/admin")
	{
		frontRouter.POST("/category/list", admin.CategoryList) // 分类列表
	}

	authRouter := router.Group("/admin").Use(middleware.JWTAuth(services.AdminGuardName))
	{
		authRouter.POST("/category/add", admin.CategoryAdd)       // 分类添加
		authRouter.POST("/category/update", admin.CategoryUpdate) // 分类修改
		authRouter.POST("/category/delete", admin.CategoryDelete) // 分类删除
		authRouter.POST("/category/getAll", admin.CategoryGetAll) //获取所有分类

	}
}
